package service

import (
	"context"
	"monoblog/common/register"
)

func GetMomentPublishService() MomentPublishService {
	return register.GetInstance[MomentPublishService]("MomentPublishService")
}

type MomentPublishService interface {
	// PublishWithBlog 发布通知，opUserId 发布了文章 blogId
	PublishWithBlog(ctx context.Context, opUserId string, blogId string) error

	// PublishWithLike 发布通知，opUserId 点赞了 blogId
	PublishWithLike(ctx context.Context, opUserId string, blogId string) error

	// PublishWithFavorite 发布通知，opUserId 收藏了 blogId
	PublishWithFavorite(ctx context.Context, opUserId string, blogId string) error

	// PublishWithFollow 发布通知，opUserId 关注了 userId
	PublishWithFollow(ctx context.Context, opUserId string, userId string) error

	// PublishWithComment 发布通知，opUserId 评论了文章
	PublishWithComment(ctx context.Context, opUserId string, commentId string) error
}
